
	// 公共房间列表仓库模块
	export default {
		namespaced: true,
		state:{
			tables:{
				"迪威一厅":[],
				"迪威二厅":[]
			  }
		},
		getters:{
			tables(state){
				return state.tables;
			}
		},
		mutations:{
			// 设置公共房间频道数据
			setPublicTable(state,Msg){
				state.tables["迪威一厅"]!=Msg.Content.HallList1?state.tables["迪威一厅"]=Msg.Content.HallList1:false;
				state.tables["迪威二厅"]!=Msg.Content.HallList2?state.tables["迪威二厅"]=Msg.Content.HallList2:false;
			},
			// 处理socket公共数据
			setRoomPublic(state,Msg){
				let i;
				for(i in state.tables){
					for(let a=0;a<state.tables[i].length;a++){
						if(Msg.TId==state.tables[i][a].TId&&Msg.GType==state.tables[i][a].GType){
								for(let c in Msg){
									if(Msg[c]!==''){
										state.tables[i][a][c]!=Msg[c]?state.tables[i][a][c]=Msg[c]:false;
									}
								}
							}
					}
				}
			},
			//处理公共列表房间时间减少
			reduce(state,index){
				if(state.tables[index.id][index.index].RestHops>0){
					state.tables[index.id][index.index].RestHops--;
				}
			}
		},
		actions:{
			// 获取公共频道数据
			getPublicTable(){
				window.userSocket.uSend('{"ActType":28,"ConnectionId":"","Content":{"HallNumber": 1},"ErrorCode":10000,"RandCode":"' + RandCode + '","UId":"' + UserId + '","GT": 1 }');
			}
		},
	}